package com.zangchat.controller;

import java.util.List;

import com.common.core.controller.BaseController;

import com.common.core.domain.AjaxResult;
import com.zangchat.service.IChatLogCashService;
import com.zangchat.service.IChatUsersService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;


/**
 * 现金流水Controller
 * 
 * @author wudi
 * @date 2020-07-17
 */
@RestController
@RequestMapping("/zangchat/cash")
public class ChatLogCashController extends BaseController
{
    @Autowired
    private IChatLogCashService chatLogCashService;

    /**
     * 流水查询
     * @param userId 登录用户id
     * @param cashType 流水类型 1 收入 -1支出
     * @return
     */
    public AjaxResult selectChatLogCash(@ModelAttribute("userId")Long userId,
                                        @ModelAttribute("cashType")Integer cashType,
                                        @ModelAttribute("pageNum")int pageNum,
                                        @ModelAttribute("pageSize")int pageSize){

       return chatLogCashService.selectChatLogCash(userId,cashType,  pageNum, pageSize);
    }
}
